package state;

import model.*;


public class NothingCached implements CachedState {
	
	public static NothingCached create (Product product){
		return new NothingCached(product);
	}

	private Product product;

	private NothingCached (Product product){
		this.product = product;
	}
	
	public Product getProduct() {
		return product;
	}

	
	public int getOverallPrice() {
		int overallPrice = this.getProduct().calculatePrice();
		this.getProduct().setCurrentState(OverallPriceCached.create(this.getProduct(),overallPrice));
		return overallPrice;
	}

	
	public MaterialList getMaterialList() {
		MaterialList materialList = this.getProduct().calculateMaterialList();
		this.getProduct().setCurrentState(MaterialListCached.create(this.getProduct(), materialList));
		return materialList;
	}

	
	public void priceChange() {
		;
	}

	
	public void structureChange() {
		;
		
	}

}
